

Object = { __Name = 'Object' }

function Object.Get(id)

      local t = { Id = id }
      setmetatable(t,Object.MetaTable)
      return t
      
end

function Object.ConvertFrom(t)

      return Object.Get(t.Id)
end

function Object:GetHashCode()

      return ObjectServant4LuaCall(self.Id,0)
end

function Object:ToString()

      return ObjectServant4LuaCall(self.Id,1)
end

Object.__GetProperty = 
{
}

Object.__SetProperty = 
{
}

function Object.__GetByIndex(t,k)

      local pf = Object.__GetProperty[k]
      if pf ~= nil then
          return pf(t)
      end
      local f = Object.__Method[k]
      if f ~= nil then
          return f
      end
      return nil
end

function Object.__SetByIndex(t,k,v)

      local pf = Object.__SetProperty[k]
      if pf ~= nil then
              pf(t,v)
            return
      end
      print(k .. ' is not a property')
end

Object.__Method = { 
          GetHashCode = Object.GetHashCode,
          ToString = Object.ToString
}

Object.MetaTable = { __index = Object.__GetByIndex,__newindex = Object.__SetByIndex }
setmetatable(Object,Object.MetaTable)